package efu.nf.seckilldemo.common.base;

import efu.nf.seckilldemo.common.result.ResultVO;
import org.springframework.http.HttpStatus;

/**
 * @author lwj
 * @create 2025-09-27-15:50
 */
public class BaseController {
    protected<T> ResultVO<T> success() {
        ResultVO<T> vo = new ResultVO<>();
        vo.setCode(HttpStatus.OK.value());
        vo.setMessage("success");
        return vo;
    }

    protected<T> ResultVO<T> success(T data) {
        ResultVO<T> vo = new ResultVO<>();
        vo.setCode(HttpStatus.OK.value());
        vo.setMessage("success");
        vo.setData(data);
        return vo;
    }
}
